home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / answrbok / 5_10.lha / 5_10 / tstc.c < prev    next >
Text File  |  1993-08-08  |  720b  |  31 lines

  1. * Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
  2. * The C++ Answer Book */
  3. * Tony Hansen */
  4. * All rights reserved. */
  5. include <stream.h>
  6. include "5_10c.h"    // class tableentry
  7. include "5_10c1.h"    // tableentry::tableentry()
  8. include "5_10c2.h"    // tableentry::~tableentry()
  9. include "5_10c3.h"    // tableentry::getvardata()
  10. include "5_10c4.h"    // tableentry::settype()
  11.  
  12. define x(xn) \
  13. cout << "namespace.get(" << xn << ")=" << namespace.getvardata(xn, &v) << "\n" \
  14.      << "\taddr=" << v->address << "\n" \
  15.      << "\ttype='" << chr(v->type) << "'\n"
  16.  
  17. ain()
  18.  
  19.    tableentry namespace;
  20.    vardata *v;
  21.  
  22.    x("hello");
  23.    x("hello");
  24.    x("there");
  25.    x("hi");
  26.    x("hello");
  27.    x("hello");
  28.  
  29.    return 0;
  30.  
  31.